<!-- <button id="login" type="submit" style="width : 100px;float:right" class="btn btn-primary" (click)="next()">to家乡信息</button> -->
<div class="tableStyle" style="margin-left: 0px;">


  <data-table class="question-bank" [isLink]="isLink" (changepage)="changepage($event)" [buttonList]="btnList" (addOpen)="addOpen($event,addModal)"
    [title]="title" [page]="page" [addButton]="btnAdd" [editButton]="btnEdit" [data]="data" [buttonList]="btnList" [arr]="arrbutes"
    [ButtonHeaders]="btnHeaders" [buttonstyle]="btnstyle" [sizeList]="sizeList" [paging]="paging" [pageSize]="pageSize" (operat)="operatData($event,editModal)"
    [deleteButton]="btnDelete" (deletesEmit)="deleteDatas($event)" [total]="total">
  </data-table>


</div>






<!--删除提示框-->
<p-confirmDialog header="提示" icon="fa fa-question-circle" width="425"></p-confirmDialog>

<!-- 提示框，隐藏IP地址 ，-->
<p-dialog header="提示" [(visible)]="display" modal="modal" width="400" [responsive]="true">
  <p style="text-align:center">
    {{messages}}
  </p>
  <p-footer>
    <button type="button" pButton icon="fa-check" (click)="display=false" label="确定"></button>
  </p-footer>
</p-dialog>

<!-- 添加薪资信息 style="visibility:hidden" visible-->
<!--<div #addModal class="modal-dialog" (click)="draggable()" style="width:700px">-->
<div #addModal class="modal-dialog" style="width:700px">
  <div  class="modal-content">
    <div class="model-header">
      <button style="margin-right: 15px" type="button" class="close" (click)="close(addModal)">×
      </button>
      <div>

      </div>
      <h4 class="modal-title" style="margin-left:20px;margin-top:20px">
        添加薪资信息
      </h4>
    </div>
    <div class="modal-body">
      <form role="form" class="form-horizontal" #addform="ngForm">

        <div class="form-group">
          <div class="col-sm-6 form-inline" style="width : 349px">
            <label>所属公司：</label>
            <label>
              <!-- (change)="changeCompany($event.target.value)"  -->
              <select class="form-control  sel-width" name="company" [(ngModel)]="salaryInfo.pcRelationId" style="width: 196px" name="company">
                <option *ngFor="let option of companyOptions" [value]="option.personCompanyId">{{option.companyName}}</option>
              </select>
              <!-- <input type="text" class="form-control"  [(ngModel)]="this.address" placeholder="请输入详细地址" name="address" required> -->
            </label>
          </div>

          <div class="col-sm-6 form-inline">
            <label>月薪：</label>
            <label>
              <input style="width: 196px" type="text" placeholder="该单位是元" class="form-control" [(ngModel)]="salaryInfo.salary" name="salary" #salary="ngModel"
                number />
            </label>
            <p [hidden]="salary.valid||salary.pristine" >月薪格式为数字格式</p>
          </div>
        </div>



        <div class="form-group">
          <div class="col-sm-6 form-inline" sel-width>
            <label for="appDate">调薪时间：</label>
            <label>
              <p-calendar name="salaryChangeTime" [(ngModel)]="salaryInfo.salaryChangeTime" dateFormat="yy-mm-dd" [showIcon]="true" [locale]="ch"></p-calendar>
              <!-- <p [hidden]="salaryChangeTime.valid||salaryChangeTime.pristine" class="alert alert-danger">请输入合法的日期</p> -->
              <!-- <label>
                  <div class="input-group" style="width : 222px">
                  </div>
                </label> -->
            </label>
          </div>

          <div style="margin-top:10px" class="col-sm-6 form-inline">
            <label>职位：</label>
            <label>
              <input style="width: 196px" type="text" class="form-control" [(ngModel)]="salaryInfo.possession" name="possession">
            </label>
          </div>
        </div>





        <div class="form-group">
          <div class="col-sm-6 form-inline">
            <label style="padding-left: 23px">年薪：</label>
            <label>
              <input style="width: 196px" type="text" placeholder="该单位是元" class="form-control" [(ngModel)]="salaryInfo.annualSalary" name="annualSalary" #annualSalary="ngModel" number>

            </label>
            <p [hidden]="annualSalary.valid||annualSalary.pristine">年薪格式为数字格式</p>
          </div>
          <div class="col-sm-6 form-inline">
            <label>备注：</label>
            <label>
              <input style="width: 196px" type="text" class="form-control" [(ngModel)]="salaryInfo.remark" name="remark">
            </label>
          </div>
        </div>


      </form>
    </div>
    <div class="modal-footer">
      <!-- [disabled]="!addform.form.valid" -->
      <button type="button" class="btn btn-primary" (click)="add(addModal)">
        添加
      </button>
      <button type="button" class="btn btn-default" (click)="close(addModal)">
        取消
      </button>
    </div>
  </div>
</div>

<div #editModal class="modal-dialog" style="width:700px">
  <div class="modal-content">

    <div class="model-header">
      <button type="button" style="margin-right: 15px" class="close" (click)="close(editModal)">×
      </button>
      <h4 class="modal-title" style="margin-left:20px;margin-top:20px">
        修改薪资信息
      </h4>
    </div>
    <div class="modal-body">
      <form role="form" class="form-horizontal">
        <div class="form-group">

          <div class="col-sm-6 form-inline">
            <label>所属公司：</label>
            <label>
              <select class="form-control sel-width" name="company" [(ngModel)]="salaryInfo.pcRelationId" style="float:left" style="width:196px"
                name="company">
                <option *ngFor="let option of companyOptions" [value]="option.personCompanyId">{{option.companyName}}</option>
              </select>
              <!-- <input type="text" class="form-control"  [(ngModel)]="this.address" placeholder="请输入详细地址" name="address" required> -->
            </label>
          </div>

          <div class="col-sm-6 form-inline">
            <label>月薪：</label>
            <label>
              <input style="width: 196px"  placeholder="该单位是元"  type="text" id="salary" class="form-control" [(ngModel)]="salaryInfo.salary" name="salary" #editSalary="ngModel"
                number />
            </label>
            <p [hidden]="editSalary.valid||editSalary.pristine">月薪格式为数字格式</p>
          </div>
        </div>



        <div class="form-group">
          <!-- <div class="col-sm-6 form-inline">
              <label>所属公司：</label>
              <label>
                <input type="text" class="form-control" [(ngModel)]="salaryInfo.pcRelationId" name="pcRelationId">
              </label>
            </div> -->


          <div class="col-sm-6 form-inline" sel-width>
            <label>调薪时间：</label>
            <label>
              <!-- <input type="text" class="form-control" [(ngModel)]="salaryInfo.salaryChangeTime" name="salaryChangeTime" #salaryChangeTime="ngModel" date />                 -->
              <p-calendar name="salaryChangeTime" [(ngModel)]="salaryInfo.salaryChangeTime" dateFormat="yy-mm-dd" value="#{calendarView.date1}"
                [showIcon]="true" [locale]="ch"></p-calendar>
            </label>
            <!-- <label> -->
            <!-- <div class="input-group" style="width : 182px">
                            </div> -->
            <!-- </label> -->

            <!-- <p [hidden]="salaryChangeTime.valid||salaryChangeTime.pristine">请输入合法的日期</p>                  -->
          </div>


          <div style="margin-top:10px" class="col-sm-6 form-inline">
            <label>职位：</label>
            <label>
              <input style="width: 196px" type="text" class="form-control" [(ngModel)]="salaryInfo.possession" name="possession">
            </label>
          </div>
        </div>

        <div class="form-group">

            <div class="col-sm-6 form-inline">
                <label style="padding-left: 23px">年薪：</label>
                <label>
                  <input style="width: 196px"  placeholder="该单位是元"  type="text" class="form-control" [(ngModel)]="salaryInfo.annualSalary" name="annualSalary" #editAnnualSalary="ngModel" number>
                </label>
                <p [hidden]="editAnnualSalary.valid||editAnnualSalary.pristine">年薪格式为数字格式</p>
              </div>

          <div class="col-sm-6 form-inline">
            <label>备注：</label>
            <label>
              <input style="width: 196px" type="text" class="form-control" [(ngModel)]="salaryInfo.remark" name="remark">
            </label>
          </div>

         

        </div>






        <div class="modal-footer">
          <!-- [disabled]="!addform.form.valid" -->
          <button type="button" class="btn btn-primary" (click)="update(editModal)">
            修改
          </button>
          <button type="button" class="btn btn-default" (click)="close(editModal)">
            取消
          </button>
        </div>



      </form>
    </div>
  </div>
</div>